package com.zycfc.zsf.boot.util.text;

import org.apache.commons.codec.binary.*;

public class Base64Util
{
    public static byte[] encode(final byte[] dataBytes) {
        return Base64.encodeBase64(dataBytes);
    }
    
    public static String encodeToString(final byte[] dataBytes) {
        return Base64.encodeBase64String(dataBytes);
    }
    
    public static byte[] decodeBytes(final byte[] base64Bytes) {
        return Base64.decodeBase64(base64Bytes);
    }
    
    public static byte[] decode(final String base64Data) {
        return Base64.decodeBase64(base64Data);
    }
}
